{
	"title": "SearXNG result",
	"description": "Unofficial schema draft for result of a query to an SearX/SearXNG API",
	"type": "object",
	"properties": {
		"query": {
			"type": "string",
			"minLength": 1,
			"maxLength": 1024
		},
		"number_of_results": {
			"type": "number",
			"minLength": 0,
			"maxLength": 1024
		},
		"results": {
			"type": "array",
			"items": {
				"type": "object",
				"additionalProperties": false,
				"properties": {
					"url": {"type": "string", "format": "uri"},
					"title": {"type": "string"},
					"engine": {"type": "string"},
					"parsed_url": {
						"type": "array",
						"prefixItems": [
							{
								"type": "string",
								"description": "URL scheme",
								"enum": ["http", "https"]
							},
							{
								"type": "string",
								"description": "URL netloc"
							},
							{
								"type": "string",
								"description": "URL path"
							},
							{
								"type": "string",
								"description": "URL parameters"
							},
							{
								"type": "string",
								"description": "URL query"
							},
							{
								"type": "string",
								"description": "URL fragment"
							}
						]
					},
					"engines": {
						"type": "array",
						"description": "Search engines that returned this result",
						"items": {
							"type": "string"
						},
						"minItems": 0,
						"maxItems": 255
					},
					"metadata": {"type": "string"},
					"positions": {
						"type": "array",
						"description": "TODO",
						"items": {
							"type": "number"
						}
					},
					"content": {"type": "string"},
					"score": {"type": "number"},
					"category": {"type": "string"},
					"content": {"type": "string"},
					"pretty_url": {"type": "string", "format": "uri"},
					"is_onion": {"type": "boolean"},
					"publishedDate": {"type": "string", "format": "date-time"},
					"pubdate": {"type": "string"},
					"thumbnail_src": {
						"description": "URL to thumbnail, used by images.",
						"type": "string"
					},
					"template": {"type": "string"},
					"author": {
						"oneOf": [
							{"type": "string"},
							{"type": "null"}
						]
					},
					"source": {"type": "string"},
					"img_format": {
						"description": "example: '2586 x 1260 · png'",
						"type": "string"
					},
					"img_src": {
						"description": "URL to image",
						"oneOf": [
							{"type": "string"},
							{"type": "null"}
						]
					},
					"seed": {
						"description": "How many (torrent) seeders there are.",
						"oneOf": [
							{"type": "string"},
							{"type": "number"}
						]
					},
					"leech": {
						"description": "How many (torrent) leechers there are.",
						"oneOf": [
							{"type": "string"},
							{"type": "number"}
						]
					},
					"magnetlink": {"type": "string"},
					"torrentfile": {"type": "string"},
					"filesize": {
						"oneOf": [
							{"type": "number"},
							{"type": "null"}
						]
					},
					"infohash": {"type": "string"},
					"files": {
						"oneOf": [
							{"type": "string"},
							{"type": "number"},
							{"type": "null"}
						]
					},
					"link": {"type": "string"},
					"thumbnail": {
						"description": "Thumbnail URL used by videos",
						"type": "string"
					},
					"embedded": {"type": "string"},
					"length": {"type": "string"},
					"code_language": {"type": "string"},
					"codelines": {"type": "array", "description": "TODO"},
					"repository": {"type": "string"},
					"longitude": {
						"oneOf": [
							{"type": "string"},
							{"type": "number"}
						]
					},
					"latitude": {
						"oneOf": [
							{"type": "string"},
							{"type": "number"}
						]
					},
					"boundingbox": {"type": "array", "description": "TODO"},
					"geojson": {"type": "array", "description": "TODO"},
					"address": {"type": "array", "description": "TODO"},
					"osm": {"type": "array", "description": "TODO"}
				}
			}
		},
		"answers": {
			"type": "array",
			"description": "TODO",
			"items": {
				"type": "string",
				"minLength": 1,
				"maxLength": 4096
			}
		},
		"corrections": {
			"type": "array",
			"description": "TODO",
			"items": {
				"type": "string",
				"minLength": 1,
				"maxLength": 4096
			}
		},
		"infoboxes": {
			"type": "array",
			"items": {
				"type": "object",
				"additionalProperties": false,
				"properties": {
					"infobox": {"type": "string"},
					"id": {"type": "string", "format": "uri"},
					"content": {
						"type": "string",
						"minLength": 0,
						"maxLength": 4096
					},
					"img_src": {
						"oneOf": [
							{
								"type": "string",
								"format": "uri"
							},
							{
								"type": "null"
							}
						]
					},
					"urls": {
						"type": "array",
						"description": "TODO",
						"items": {
							"type": "object",
							"properties": {
								"title": {
									"type": "string",
									"minLength": 0,
									"maxLength": 255
								},
								"url": {
									"type": "string",
									"format": "uri"
								},
								"entity": {
									"type": "string",
									"minLength": 0,
									"maxLength": 255
								},
								"official": {
									"type": "boolean"
								}
							},
							"additionalProperties": false
						}
					},
					"attributes": {
						"type": "array",
						"description": "TODO",
						"items": {
							"type": "object",
							"properties": {
								"label": {
									"type": "string",
									"minLength": 0,
									"maxLength": 255
								},
								"value": {
									"type": "string",
									"minLength": 0,
									"maxLength": 1024
								},
								"entity": {
									"type": "string",
									"minLength": 0,
									"maxLength": 1024
								}
							},
							"additionalProperties": false
						}
					},
					"engines": {
						"type": "array",
						"description": "TODO",
						"items": {
							"type": "string",
							"minLength": 1,
							"maxLength": 255
						}
					},
					"engine": {
						"type": "string",
						"description": "TODO"
					}
				}
			}
		},
		"suggestions": {
			"type": "array",
			"items": {
				"type": "string",
				"minLength": 1,
				"maxLength": 1024
			},
			"minItems": 0,
			"maxItems": 64
		},
		"unresponsive_engines": {
			"type": "array",
			"items": {
				"type": "array",
				"items": false,
				"prefixItems": [
					{"type": "string", "description": "engine"},
					{"type": "string", "description": "error message"}
				],
				"minLength": 2,
				"maxLength": 2
			},
			"minItems": 0,
			"maxItems": 128
		}
	},
	"additionalProperties": false
}
